#parse("/common/common.html")
#macro(childMenus $childs )
 <ul class="submenu">
  #foreach( $child in $childs )
	<li>
	   #if($child.children.size()>0)
		  <a href="#" class="dropdown-toggle">
			<i class="icon-double-angle-right $!{child.value.icon}"></i>
			$!{child.name}
			<b class="arrow icon-angle-down"></b>
		   </a>
		  #childMenus($child.children)
		#else
		   <a href="#" onclick="addTable('$!{child.id}','$!{child.name}','${contextPath}$!{child.value.url}')">
			<i class="icon-double-angle-right $!{child.value.icon}"></i>
			$!{child.name}
		   </a>
		#end
	</li>
  #end
  </ul>
#end

<script type="text/javascript">
	try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
</script>

<div class="sidebar-shortcuts" id="sidebar-shortcuts">
	<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
		<button class="btn btn-success">
			<i class="icon-signal"></i>
		</button>

		<button class="btn btn-info">
			<i class="icon-pencil"></i>
		</button>

		<button class="btn btn-warning">
			<i class="icon-group"></i>
		</button>

		<button class="btn btn-danger">
			<i class="icon-cogs"></i>
		</button>
	</div>

	<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
		<span class="btn btn-success"></span>

		<span class="btn btn-info"></span>

		<span class="btn btn-warning"></span>

		<span class="btn btn-danger"></span>
	</div>
</div><!-- #sidebar-shortcuts -->

<ul class="nav nav-list">
#foreach( $menu in $menus)
    <li>
       #if($menu.value.url == '#')
		<a href="#" class="dropdown-toggle">
			<i class="$!{menu.value.icon}"></i>
			<span class="menu-text">$!{menu.name}</span>
			<b class="arrow icon-angle-down"></b>
		</a>
		 #childMenus($menu.children)
	  #else	 
	     <a href="#" onclick="addTable('$!{menu.id}','$!{menu.name}','${contextPath}$!{menu.value.url}')">
			<i class="$!{menu.value.icon}"></i>
			<span class="menu-text">$!{menu.name}</span>
		</a>
	  #end
	</li>
#end
</ul><!-- /.nav-list -->

<div class="sidebar-collapse" id="sidebar-collapse">
	<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
</div>

<script type="text/javascript">
	try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
</script>
